import { stringify } from 'qs';
import request from '@/utils/requestnodva';

export async function GetStoreNavigator(callback) {
  // console.log(storeId,88)
  // storeId=10000000001;
  return request(`/${window.storeId}/AppConfig/GetStoreNavigator`, {}, callback);
}
export async function GetProductGroup(callback) {
  // console.log(storeId,88)
  // storeId=10000000001;
  return request(`/${window.storeId}/AppConfig/GetProductGroup`, {}, callback);
}
export async function GetActivityType(callback) {
  // console.log(storeId,88)
  // storeId=10000000001;
  return request(`/${window.storeId}/AppConfig/GetActivityType`, {}, callback);
}

export async function GetIconList(params,callback) {
    // console.log(storeId,88)
    // storeId=10000000001;
    return request(`/${window.storeId}/AppConfig/GetIconList?Type=${params.Type}`, {}, callback);
  }
export async function GetList(callback) {
  // console.log(storeId,88)
  // storeId=10000000001;
  return request(`/${window.storeId}/MicroPage/GetList`, {}, callback);
}





export async function GetFunctionPathList(params,callback) {
  // console.log(storeId,88)
  // storeId=10000000001;
  return request(`/${window.storeId}/AppConfig/GetFunctionPathList?${stringify(params)}`,{}, callback);
}
export async function GetProductPathList(params,callback) {
  // console.log(storeId,88)
  // storeId=10000000001;
  return request(`/${window.storeId}/AppConfig/GetProductPathList?${stringify(params)}`,{}, callback);
}
export async function GetMicroPagePathList(params,callback) {
  // console.log(storeId,88)
  // storeId=10000000001;
  return request(`/${window.storeId}/AppConfig/GetMicroPagePathList?${stringify(params)}`,{}, callback);
}
export async function GetActivityPathList(params,callback) {
  // console.log(storeId,88)
  // storeId=10000000001;
  return request(`/${window.storeId}/AppConfig/GetActivityPathList?${stringify(params)}`,{}, callback);
}




export async function GoToWeixin(params) {
  return request(`${params.MpUrl}/WXAuth/GoToWeixin`, {
    method: 'POST',
    body: {
      NotifyUrl: params.NotifyUrl,
      method: 'delete',
    },
  });
}
